<include file="Public:header" />
<style>
.tree {
}
.tree li {
    list-style-type:none;
    margin:0;
    padding:10px 5px 0 5px;
    position:relative
}
.tree li::before, .tree li::after {
    content:'';
    left:-20px;
    position:absolute;
    right:auto
}
.tree li::before {
    border-left:1px solid #999;
    bottom:50px;
    height:100%;
    top:0;
    width:1px
}
.tree li::after {
    border-top:1px solid #999;
    height:20px;
    top:25px;
    width:25px
}
.tree li span {
    -moz-border-radius:5px;
    -webkit-border-radius:5px;

    border-radius:5px;
    display:inline-block;
    padding:3px 8px;
    text-decoration:none
}
.tree li.parent_li>span {
    cursor:pointer
}
.tree>ul>li::before, .tree>ul>li::after {
    border:0
}
.tree li:last-child::before {
    height:25px
}
</style>
<section role="main" class="content-body">
    <header class="page-header"></header>
    <!-- start: page -->
    <section class="panel">
        <header class="panel-heading">
            <h2 class="panel-title">我的直推组织</h2></header>
        <div class="panel-body">
            <div id="datatable-default_wrapper" class="dataTables_wrapper no-footer">
				<div class="tabs">
					<div class="tab-content">
						<form class="form-horizontal js-ajax-form" action="" method="post">
							<div class="control-group">头像信息：[会员账号] [级别] [姓名] [推荐人数]
					</div>
					<ul>
						<li>
							<span></span><span class="name"><img src="__PUBLIC__/Home/images/member1.gif">[{$home_user_info['username']}][{$home_user_info['leavel']}][{$home_user_info['realname']}][{$tuinum}]</span><span></span>
							<ul>
								<foreach name='tree' item='v'>
									<li class="mumber">
										<span style="cursor:pointer" onclick="getUser($(this),'{$v['username']}')" ><span class="name"><img src="__PUBLIC__/Home/images/member1.gif">[{$v['username']}][{$v['leavel']}][{$v['realname']}][{$v['tuinum']}]</span><span></span></span> 
									</li>
								</foreach>
							</ul>
						</li>
					</ul>
					<script>
						function getUser(_this,username){
								$(_this).find(".tishi").remove()
								$.post("{:U('Team/ajaxGetTuiUserData')}",{"username":username},function(msg){
									if(msg.list.length!=0 & msg.status==true){
										_this=_this.parent();
										_this.find('ul').remove();
										_this.append("<ul></ul>");
										for(var i=0;i<msg.list.length;i++){
										_this.find("ul").append("<li class='mumber' ><span style='cursor:pointer' onclick=getUser($(this),'"+msg['list'][i]['username']+"') ><span class='name'><img src='/Public/Home/images/member1.gif'>["+msg['list'][i]['username']+']'+'['+msg['list'][i]['leavel']+']'+'['+msg['list'][i]['realname']+']'+'['+msg['list'][i]['tuinum']+']'+"</span></li>");
										}
									}else{
										alert("没有下线会员");
									}
								})
						}
					</script>
				</div>
            </div>
        </div>
    </section>
    <!-- start: sidebar-right -->
    <!-- start: sidebar-right -->
    <aside id="sidebar-right" class="sidebar-right">
        <div class="nano has-scrollbar">
            <div class="nano-content" tabindex="0" style="right: -17px;">
                <a href="#" class="mobile-close visible-xs">回到儀表板
                    <i class="fa fa-chevron-right"></i></a>
            </div>
            <div class="nano-pane" style="display: none; opacity: 1; visibility: visible;">
                <div class="nano-slider" style="height: 340px; transform: translate(0px, 0px);"></div>
            </div>
        </div>
    </aside>
    <!-- end: sidebar-right -->
    <!-- end: sidebar-right --></section>
<include file="Public:footer" />